package com.lizhen.core.basicdatatype;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;

public class DateDataType {
    public static void main(String[] args) {
        String s1 = new Date().toString();
        String s12 = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss").format(new Date());
        try {
            Date d1 = new SimpleDateFormat("yyyy-MM-dd").parse("1992-02-21");
        } catch (ParseException e) {
            e.printStackTrace();
        }
        Calendar c1 = Calendar.getInstance();
        c1.set(2018, 10, 11);
        c1.add(Calendar.MONTH, 1);
        int i1 = c1.get(Calendar.MONTH) + 1;
        GregorianCalendar gc1 = new GregorianCalendar();
        gc1.get(Calendar.MONTH);
    }
}
